#ifndef _RADIO_API_H_
#define _RADIO_API_H_

#include "config.h"

#ifdef __IAR_SYSTEMS_ICC__

void init_radio_chip(void);
void radio_chip_sleep(void);
void set_band_fre(u8 mode,u8 disp_cmd);
void radio_info_init(void);
bool radio_band_scan(u8 mode);
void radio_save_station_hdlr(void);
void switch_radio_band_func(void);
void restore_station_from_ch(void);

#endif  /*  __IAR_SYSTEMS_ICC__ */

#define RADIO_CUR_FRE          0
#define RADIO_FRE_DEC          1
#define RADIO_FRE_INC			2

#define RADIO_SCAN_STOP        0
#define RADIO_SCAN_PREV        1
#define RADIO_SCAN_NEXT		2
#define RADIO_SCAN_ALL         3

#define MAX_FRE    1080
#define MIN_FRE	   875
#define MAX_CHANNL (MAX_FRE - MIN_FRE + 1)


#define RADIO_MAX_CH    20
#define RADIO_MAX_CH    20

#define PRESET_MASK				0xF0
#define PRESET_OK				0xA0
#define PRESET_ZONE_MASK		0x01

#define PRESET_SAVE_MASK		0x0E
#define PRESET_SAVE_OK			0x0A


#define SAVE_FREQ_MASK			0x80
enum{

	RESET_FM_PRESET,
	RESET_EUR_AM_PRESET,
	RESET_USA_AM_PRESET,
	GET_FM_PRESET_FROM_EPPROM=0xFE,
	GET_AM_PRESET_FROM_EPPROM,
};
enum{

	NO_SHOW_FREQ,
	SHOW_FREQ,
};

enum{

	RADIO_BAND_FM,
	RADIO_BAND_AM,
};

typedef struct{
	u16	MIN_FREQ;
	u16 	MAX_FREQ;
	u8 	FREQ_STEP;
}FREQ_RAGE;


#endif  /*  _FM_API_H_   */
